package com.hsyt.pfc.core.queue;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

/**
 * @Description:
 * @ClassName: WaitingQueueTask
 * @Package: com.hsyt.pfc.core.queue
 * @Author: wangze@hsyuntai.com
 * @Date: 2018年9月30日 9:06
 * @Copyright: 版权归 HSYUNTAI 所有
 */
public class WaitingQueueTask implements Serializable {

    public WaitingQueueTask(Object target, String method) {
        this.target = target;
        this.method = method;
    }

    public WaitingQueueTask(Object target, String method, List<Object> paramters) {
        this.target = target;
        this.method = method;
        this.paramters = paramters;
    }

    private Object target;

    private String method;

    private List<Object> paramters;

    public Object getTarget() {
        return target;
    }

    public void setTarget(Object target) {
        this.target = target;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public List<Object> getParamters() {
        return paramters;
    }

    public void setParamters(List<Object> paramters) {
        this.paramters = paramters;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WaitingQueueTask that = (WaitingQueueTask) o;
        return Objects.equals(target, that.target) &&
                Objects.equals(method, that.method) &&
                Objects.equals(paramters, that.paramters);
    }

    @Override
    public int hashCode() {
        return Objects.hash(target, method, paramters);
    }
}
